import {baseAjax} from '../baseAjax'

// 批量转让
export function transferBatch (data, successHandle, failHandle) {
  baseAjax('/ent/customer/transfer', data, 'put', successHandle, failHandle)
}

// 转成交
export function turnToFinish (id, successHandle, failHandle) {
  let _url = '/ent/customer/flow/deal/' + id
  baseAjax(_url, {}, 'put', successHandle, failHandle)
}

// 转意向
export function turnToPossible (id, successHandle, failHandle) {
  let _url = '/ent/customer/flow/interest/' + id
  baseAjax(_url, {}, 'put', successHandle, failHandle)
}

// 删除
export function deleteCustomer (id, successHandle, failHandle) {
  let _url = '/ent/customer/' + id
  baseAjax(_url, {}, 'delete', successHandle, failHandle)
}

// 转让成交客户的成交记录
export function addCooperation (data, successHandle, failHandle) {
  baseAjax('/ent/customer/cooperation/save', data, 'post', successHandle, failHandle)
}
// 重名判断
/* export function checkRepeatName (data, successHandle, failHandle) {
  baseAjax('/ent/customer/info/confirm', data, 'post', successHandle, failHandle)
} */

// 资质项树形获取
export function getQualiTree (successHandle, failHandle) {
  baseAjax('/quali/tree', {}, 'get', successHandle, failHandle)
}
